Ext.define('Jee.data.JsonWriter', {
    extend: 'Ext.data.writer.Json',
    alias: 'jsonWriter',
    writeRecords: function(request, data) {
        var root = this.root; 
        if (this.allowSingle && data.length == 1) {
            data = data[0];
        }
        var jeeRequest = {};
        jeeRequest.serviceId = request.operation.serviceId;
        jeeRequest.data = data;
        request.jsonData = jeeRequest;
        return request;
   }
/**
,
 write: function(request) {
        var operation = request.operation,
            records   = operation.records || [],
            len       = records.length,
            i         = 0,
            data      = [];

        for (; i < len; i++) {
            data.push(this.getRecordData(records[i]));
        }
        return this.writeRecords(request, data);
    }
*/
});
